package com.example.webone.services.Impl;

import com.example.webone.mapper.ManMapper;
import com.example.webone.pojo.Man;
import com.example.webone.services.ManService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("ManService")
public class ManServiceImpl implements ManService {

    @Autowired
    ManMapper manMapper;

    @Override
    public List<Man> getAllMan() {
        List<Man> men = manMapper.getAllMan();
        return men;
    }

    @Override
    public Man getMan(int id) {
        Man man = manMapper.getMan(id);
        return man;
    }

    @Override
    public int insertMan(Man man) {
        return manMapper.insertMan(man);
    }

    @Override
    public int addMan(Map<String, Object> map) {
        return manMapper.addMan(map);
    }
}
